
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[dbo].[HC_ITEM_REPORT_UPDATE]') AND TYPE IN (N'P', N'PC'))
DROP PROCEDURE [dbo].[HC_ITEM_REPORT_UPDATE]
GO

CREATE PROCEDURE [dbo].[HC_ITEM_REPORT_UPDATE]
(
    @ITEM_DETAIL_ID INT,
    @HC_ITEM_STATU VARCHAR(10),
    @REPORT_GUID VARCHAR(100),
    @HC_ITEM_REPORT_DESC NVARCHAR(1000),
    @USR_CRTN_ID VARCHAR(50),
	@HC_ITEM_REPORT_ID int  output
)
AS

BEGIN
   SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED      
    SET NOCOUNT ON  

	INSERT INTO dbo.HC_ITEM_REPORT
           (
            ITEM_DETAIL_ID,
            HC_ITEM_STATU,
            REPORT_GUID,
            HC_ITEM_REPORT_DESC,
            USR_CRTN_ID
		)
     VALUES
      (
		  @ITEM_DETAIL_ID,
		  @HC_ITEM_STATU,
		  @REPORT_GUID,
		  @HC_ITEM_REPORT_DESC,
           @USR_CRTN_ID  
		)     
		SELECT @HC_ITEM_REPORT_ID = SCOPE_IDENTITY()
		

END
GO
